(function() {

this.codium = this.codium || {};
this.codium.panel = this.codium.panel || {};

this.codium.panel.UserInfo = pasta.webgui.Panel.extend(
{
	init : function() 
	{
		this._super();
		
		this.setWidth(400);
		this.setHeight(100);
		
		this.frame = new pasta.webgui.Shape();
		this.frame.setWidth(54);
		this.frame.setHeight(54);
		this.frame.setLeft(this.getWidth() - this.frame.getWidth() - 10);
		this.frame.setTop(5);
		this.frame.setBgColor("#FFFFFF");
		this.frame.setBorderColor("#000000");
		this.frame.setShadow("0px 2px 6px #000000");
		this.addControl(this.frame);
		
		this.picPhoto = new pasta.webgui.Picture();
		this.picPhoto.setWidth(48);
		this.picPhoto.setHeight(48);
		this.picPhoto.setLeft(this.frame.getLeft() + 4);
		this.picPhoto.setTop(this.frame.getTop() + 4);
		this.picPhoto.setImage(this.libDir + "/img/icon/userDefault.png");
		this.addControl(this.picPhoto);
		
		this.frameBorder = new pasta.webgui.Shape();
		this.frameBorder.setWidth(48);
		this.frameBorder.setHeight(48);
		this.frameBorder.setLeft(this.frame.getLeft() + 3);
		this.frameBorder.setTop(this.frame.getTop() + 3);
		this.frameBorder.setBorderColor("#999999");
		this.addControl(this.frameBorder);
		
		this.lblWelcome = new pasta.webgui.Label();
		this.lblWelcome.setLeft(0);
		this.lblWelcome.setTop(12);
		this.lblWelcome.setWidth(this.frame.getLeft() - 10);
		this.lblWelcome.setCaption("Selamat Datang");
		this.lblWelcome.font.setItalics(true);
		this.lblWelcome.font.setColor("#FFFFFF");
		this.lblWelcome.setAlign("right");
		this.lblWelcome.setShadow("0px 1px 4px #000000");
		this.addControl(this.lblWelcome);
		
		this.lblUser = new pasta.webgui.Label();
		this.lblUser.setLeft(0);
		this.lblUser.setTop(23);
		this.lblUser.setWidth(this.frame.getLeft() - 10);
		this.lblUser.setHeight(40);
		this.lblUser.setCaption("Administrator");
		this.lblUser.font.setBold(true);
		this.lblUser.font.setColor("#FFFFFF");
		this.lblUser.font.setSize(28);
		this.lblUser.setAlign("right");
		this.lblUser.setShadow("0px 1px 4px #000000");
		this.addControl(this.lblUser);
	},	
	
	//-------------------- Service Event Handler --------------
	
	setUserName : function(data)
	{
		this.lblUser.setCaption(data);
	},
	
});

})();